﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logo.command
{
    public class MacroCommand : Command
    {
        private List<Command> commands;

        public MacroCommand(LogoDraw logo)
        {
            this.logo = logo;
            commands = new List<Command>();
        }

        public override void Execute()
        {
            foreach (Command command in commands)
            {
                command.Execute();
            }
        }

        public void Add(Command command)
        {
            commands.Add(command);
        }

        public bool Remove(Command command)
        {
            return commands.Remove(command);
        }
    }
}
